﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using BuySoftwareOnline.Domain.Concrete;
using BuySoftwareOnline.Domain.Abstract;
using System.Web.Mvc;

namespace BuySoftwareOnline.Domain.Entities
{
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public class ExistAttribute : ValidationAttribute
    {
        public ExistAttribute()
            : base("Vui lòng nhập tài khoản")
        {
        }
        public override bool IsValid(object value)
        {
            return value.ToString() != "phucan1108";
        }
    }
}
